package poly;

public class Pet {
    private String name;
    private String masterName;
    private int id;
    public Pet(String name,String masterName,int id){
        this.name=name;
        this.masterName=masterName;
        this.id=id;
    }
    public String getName(){
        return name;
    }
    public String getMasterName(){
        return masterName;
    }
    public int getId(){return id;}
    public void introduce(){
        System.out.println("我的名字是"+name+".");
        System.out.println("我主人的名字是"+masterName+".");
    }

}

